import { SkillInfo } from "../../../model/SkillInfo";
import { GTextFormat } from "../../../../common/GTextFormat";
import { FontUtil } from "../../../../common/font/FontUtil";
//class SkillToolTip
    
    export  class SkillToolTip /* flash.display.Sprite */
    {
        constructor(arg1: SkillInfo=null)
        {
            
            this.initUI();
            this.data = arg1;
            return;
        }

        public set data(arg1: SkillInfo)
        {
            if (!arg1) 
            {
                return;
            }
            this._skillName.text = arg1.tSkill.skillName;
            this._skillInfo.htmlText = arg1.getSkillInfoTips();
            return;
        }

        /* internal  */initUI(): void
        {
            mouseChildren = false;
            mouseEnabled = false;
            this._skillName = new Object /* flash.text.TextField */();
            this._skillName.defaultTextFormat = new GTextFormat(FontUtil.songtiName, 14, 16121600, null, null, null, null, null, flash.text.TextFormatAlign.CENTER);
            this._skillName.width = 190;
            this._skillName.x = 5;
            this._skillName.y = 5;
            addChild(this._skillName);
            this._skillInfo = new Object /* flash.text.TextField */();
            this._skillInfo.autoSize = flash.text.TextFieldAutoSize.LEFT;
            this._skillInfo.textColor = 16777215;
            this._skillInfo.width = 190;
            this._skillInfo.multiline = true;
            this._skillInfo.wordWrap = true;
            this._skillInfo.x = 5;
            this._skillInfo.y = 35;
            addChild(this._skillInfo);
            return;
        }

        public dispse(): void
        {
            return;
        }

        public /* override */ get height(): number
        {
            return this._skillName.textHeight + this._skillInfo.textHeight + this._skillInfo.y;
        }

        public /* override */ get width(): number
        {
            return 200;
        }

        protected /* var */_skillName: Object /* flash.text.TextField */;

        protected /* var */_skillInfo: Object /* flash.text.TextField */;
    }
